package com.example.utils;

public class Const {

    //放在attribute中的用户ID
    public static final String USER_ID = "userId";

    //redis中的token黑名单
    public static final String JWT_BLACK_LIST = "jwt:blacklist:";

    //redis中的限流黑名单
    public static final String FLOW_LIMIT_BLACK_LIST = "flow:block:";
    //限流计数器
    public static final String FLOW_LIMIT_COUNTER = "flow:counter:";

    //自定义过滤器的优先级（要比SpringSecurity的都要高）
    public final static int ORDER_FLOW_LIMIT = -101;
    public final static int ORDER_CORS = -102;

    //邮件验证码
    public final static String VERIFY_EMAIL_LIMIT = "verify:email:limit:";
    public final static String VERIFY_EMAIL_DATA = "verify:email:data:";

    //用户角色
    public final static String ROLE_DEFAULT = "user";
    //论坛相关
    public final static String FORUM_WEATHER_CACHE = "weather:cache:";
    public final static String FORUM_IMAGE_COUNTER = "forum:image:";
    public final static String FORUM_TOPIC_CREATE_COUNTER = "forum:topic:create:";
    public final static String FORUM_TOPIC_COMMENT_COUNTER = "forum:topic:comment:";
    public final static String FORUM_TOPIC_PREVIEW_CACHE = "topic:preview:";


}
